/*
 * api.js
 * 文章接口
 * date: 2021-07-14
 */
import request from '@/utils/request.js'
// 文章
const base = '/my/article'
export const cate = {
	// 获取文章分类的列表数据
	list: (param = {}, config = {}) => request.post(`${base}/cates`, param, config),
	// 新增文章分类
	add: (param = {}, config = {}) => request.post(`${base}/addcates`, param, config),
	// 删除文章分类
	delete: (id, config = {}) => request.get(`${base}/deletecate/${id}`, config),
	// 根据 Id 获取文章分类
	get: (id, config = {}) => request.get(`${base}/cates/${id}`, config),
    // 更新文章分类
	update: (param = {}, config = {}) => request.post(`${base}/updatecate`, param, config),
};

export default { cate };